# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php84-pecl-uuid
_extname=uuid
pkgver=1.2.1
pkgrel=0
pkgdesc="PHP 8.4 wrapper around libuuid from the ext2utils project - PECL"
url="https://pecl.php.net/package/uuid"
arch="all"
license="LGPL-2.1-or-later"
_phpv=84
_php=php$_phpv
depends="$_php-common"
makedepends="$_php-dev util-linux-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"

build() {
	phpize$_phpv
	./configure --prefix=/usr --with-php-config=php-config$_phpv
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test TESTS=--show-diff
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/$_php/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/50_$_extname.ini
}

sha512sums="
32afa4e71e6b3a524b0ab4dcf021b5c6272b4061e4bea352355468f0f001ccba7c1ad72b397c35d012ceabc1a3ade68babe37e3c38ef7d83f6d5c3eee3b528d8  php-pecl-uuid-1.2.1.tgz
"
